package cn.cdqf.coupon.dao;

import cn.cdqf.coupon.entity.CouponTemplate;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CouponTemplateMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CouponTemplate record);

    int insertSelective(CouponTemplate record);

    CouponTemplate selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CouponTemplate record);

    int updateByPrimaryKey(CouponTemplate record);

    List<String> queryByMerchantIdAndLevel(@Param("merchantId") String merchantId,@Param("begin") Integer begin, @Param("end") Integer end);

    int decrByCouponId(@Param("couponId") String couponId, @Param("count") Integer count);


    CouponTemplate queryByCouponId(@Param("couponId") String couponId);

}